import pandas as pd

# 读取Excel文件
df = pd.read_excel('D:\\project_file\\20250804 课程讲下线\\操作下线的讲20250801 - 产品确认最新.xlsx')

# 方法1：通过列名获取并转换为set

filtered_set = set(df[df['是否操作线下'] == '是']['课程讲id'])


# column_set = (
#     set(df['课程讲id']))

print(len(filtered_set))
print(filtered_set)

# # 读取Excel文件
# df1 = pd.read_excel('D:\\project_file\\20250804 课程讲下线\\20250811操作下线的讲 20250801 - 产品确认.xlsx')
#
# # 方法1：通过列名获取并转换为set
#
# filtered_set1 = set(df1[df1['是否操作线下'] == '是']['课程讲id'])
#
#
# # column_set = (
# #     set(df['课程讲id']))
#
# print(len(filtered_set1))
# print(filtered_set1)



# first_10 = list(filtered_set)[:10]
first_10 = list(filtered_set)[10:110]
first_300 = list(filtered_set)[110:410]
first_500 = list(filtered_set)[410:910]
first_last = list(filtered_set)[910:1447]
print(first_300)
print(first_500)
print(first_last)

list1 = [73738,8204,57359,57360,57361,57362,57363,65564,8228,49214]

list2 = [49217,49220,57441,57442,57443,57444,57445,57448,57452,57453,57454,41068,57460,39103,49297,49300,57493,57494,57506,35853,57510,57511,57512,57513,57514,57515,57516,65717,82109,65727,65728,65729,65730,65731,65732,65733,65734,65735,65736,65737,65738,65739,65740,65741,35874,35880,35881,65858,35885,35886,65867,49546,49548,49549,49571,49580,57787,57788,57789,57794,57796,49606,57804,35914,35915,49642,49643,49644,49650,66045,57868,57880,66082,66083,57895,57904,57924,57934,57938,66144,66145,66146,49783,90759,90760,58005,74392,8890,41658,49856,90837,74454,74455,49877,49878,90844,90846,90863,49933,74512]

list3 = [74513,74514,74515,74516,74517,74518,74519,74520,74521,74522,74523,66332,74525,74526,74527,74528,66333,74530,74531,74532,66334,74534,74535,66335,66336,41767,66348,58163,58164,58166,58167,58168,58169,58205,66404,66416,66417,58236,41876,41877,924,933,935,946,66482,955,958,91070,66501,50151,91129,66567,1066,50222,42048,42049,58444,50271,50272,50273,50274,50275,91234,91236,91249,91250,58488,58490,91259,42119,74888,42120,91274,58507,91276,91279,42128,91288,50332,50340,33957,50342,74924,50348,42171,33979,33982,50372,50373,74950,74951,50374,74953,91377,25844,50435,58658,58660,91509,34188,34202,17840,91602,91642,50685,50686,50687,50688,50689,50690,42502,83467,50736,50737,75357,91754,91756,42604,42607,42608,99966,50821,99975,91792,67219,67220,67221,67222,50838,50839,50840,59038,59039,59041,59043,59044,42661,59047,91824,59080,42698,42723,42725,50926,50928,50946,91917,75543,34591,51004,10073,10083,92018,92019,92020,92021,42870,42869,92026,92027,51073,51076,51101,51105,51110,42920,51113,51114,42922,42921,51118,92079,42932,92086,51131,59325,51136,51142,51147,59341,51151,34769,51155,34772,51159,34777,51163,18398,51167,18400,42977,42976,51171,42979,42981,34788,51175,44364,34784,51179,92143,59375,51186,51187,43002,43003,43004,43005,92167,51214,34842,51233,92197,92200,34879,34882,43079,92238,92247,34913,43121,34971,51377,51378,51379,51380,51381,51382,51383,51384,51385,51386,43189,35006,35009,43202,43208,43209,18639,35026,35029,18662,43250,92404,92419,92423,92424,92426,92427,92428,43280,59710,18773,35163,84318,35167,35171,35175,10601,59754,59755,59756,59757,43374,59758,43369,43378,43379,59764,59765,59766,59770,59771,92540,92541,10622,59781,59782,59783,92557,92558,59791,59792,59793,43423,68006,43443,18899,43477,2533,43495,84495,84501,68139,59962,59963,59964,59984,92774]

list4 = [92775,92776,92777,92778,92779,92790,84613,60054,68258,68263,35501,35504,68273,35507,68276,68278,35510,35513,35516,27326,35519,68288,35522,68291,35525,35528,68297,68303,92879,68305,10963,68308,68312,68321,60131,68324,60135,60139,68334,60143,60147,43763,60151,60155,60159,60163,60167,60171,60175,60179,92949,60187,60191,19234,60195,43813,60199,43816,43817,60203,60207,60211,27445,60215,60220,60222,60223,60224,60240,84817,60250,19295,84835,60270,60271,60274,19322,60282,60285,52096,52097,68482,60291,60290,52098,27521,60296,60298,60299,60300,60301,60302,60303,60304,84882,60310,60314,60315,60321,60322,60324,60335,43952,68543,60353,68546,60354,43970,68549,93134,60368,52179,52180,27605,60381,60382,52207,60401,60402,84982,60406,60411,93182,60415,60416,52228,52229,52230,52231,52232,52233,52234,52235,52236,52237,35854,35855,35856,35857,68626,60434,35859,35858,60438,35863,35865,68640,35873,68642,35875,68644,35877,35876,35879,68648,68649,35882,35883,35884,68653,68654,35887,68656,35889,35888,60467,68660,68661,35893,60471,35892,60475,60479,44098,60483,60487,52298,52299,52300,60491,52301,52302,60495,52304,52305,52306,60499,52307,52303,60503,60507,85086,60511,85088,60515,60519,60523,60527,60531,101495,60535,60539,60543,60547,60548,60549,60550,44163,60552,60553,44172,60558,60560,60561,60562,60567,60568,60569,44185,60571,44184,60573,60574,44190,44183,60578,60579,60580,60581,44201,44202,60588,44205,44206,44207,60596,60597,60598,60600,60601,93374,60609,60610,60611,60614,60618,60619,60621,60622,60623,60628,60629,60630,60632,52445,60638,60639,60640,60641,60642,52450,52449,52448,60648,60649,60650,60653,68846,60656,60658,60659,60660,60661,36086,36087,60668,60669,60673,60678,60681,60682,93451,93452,60683,60688,60689,60690,60692,60693,36118,60698,60700,60701,60707,60708,60709,60710,60712,60713,60718,60720,60721,60722,60723,60728,60729,60732,93505,60738,60739,60740,36162,44362,44363,60748,44365,44366,60751,60752,44369,44370,44371,44368,44367,36173,68951,52580,52581,52582,85351,52584,52585,52586,52588,52589,52590,52591,52593,52594,44403,52596,52597,52598,44404,52600,52601,52602,68988,52605,52606,52604,52608,52609,52610,52612,52613,52614,52616,52617,52618,52620,52621,52622,36237,52624,52625,52626,69011,52628,52629,52630,69012,52632,52633,52634,69015,52636,52637,52638,52640,52641,52642,52644,52645,52646,52648,52649,52650,52652,52653,52654,60844,52656,60846,60847,60845,60848,60849,69044,60851,60850,52658,52657,69055,69056,69057,36290,69059,69060,69063,36295,36300,44500,44502,44503,44504,36315,60892,60893,60894,60895,60896,36318,36322,44515,36323,36325,60903,60904,60905,69098,60907,60908,60906,69102,52719,52720,52721,69106,52723,52724,52725,52726,52727,52728,52722,44552,44565,44569,44573,44577,44581,44584,44585,44589,44593,44597,44601,44605,44609,44612,44613,44617,44620,44621,69198,69199,69200,69201,69202,61006,44628,44629,44625,44624,85620,69240,61051,69244,69247,69248,69249,69252,69257,69259,69260,69261,69267,69269,61081,61082,69290,69292,61109,20176,61179,61184,61208,61210,69427]

list5= [69429,69465,69466,69467,69468,61292,61296,45000,45001,45005,45018,45019,45020,45021,45054,45060,61458,61460,69730,69731,69732,53455,12496,69850,69851,69852,69853,69854,69855,69856,69857,69880,69882,69884,69889,69894,69900,69906,69907,61721,61722,61723,61724,61725,61726,61727,61728,86335,86336,86337,86338,86339,86340,12618,12619,12670,12718,45505,45506,45513,37330,37331,37332,37333,37335,37337,37338,37339,37340,53773,53775,53777,53779,53794,53797,53799,53806,53811,37433,37434,37435,12861,53824,37441,12867,62025,53834,70228,45654,45655,45656,12930,70277,62107,62108,62126,62127,86763,13040,62199,86782,13066,13085,62408,62409,62410,62430,62431,62476,70724,46296,29919,29920,29945,29946,46385,79259,79284,71126,46583,54797,63017,63038,63047,87639,5742,38535,54934,71321,71322,71323,71324,71325,71347,46772,46778,46780,46781,46784,46785,63193,63195,63198,30453,55051,71476,71478,71481,55133,55140,55149,55150,55152,55156,55160,55161,55166,55168,55170,55171,55172,55173,55174,55176,55177,55178,55179,55180,55182,55183,55186,30618,30620,55212,55213,55214,55215,55216,55222,55223,55225,55226,55227,55237,55238,55239,63457,55269,47108,47109,47110,47111,79929,55355,47182,47183,47184,47185,47186,47187,47188,47189,47190,47191,47192,47193,63656,80041,80042,80043,80044,63657,63674,63675,63676,63679,63680,63681,63682,63683,63684,39105,55494,63687,63688,63689,63690,63691,55500,39114,55508,55515,39147,39148,39149,39150,39151,39152,71937,47384,80161,80162,80163,80164,80165,80166,80167,47412,47413,47414,47415,47416,47417,47418,47419,47420,47421,47423,47424,47425,47426,47427,47428,47429,47430,47431,47432,47433,47434,47435,47436,47437,47438,47439,47440,47441,47442,47443,47444,47445,47446,47447,47448,47449,47450,47451,47452,47453,96616,39282,39283,39284,39285,39286,39287,39288,39289,39290,39291,39292,39293,39294,39295,39296,39297,39298,39299,39300,39301,47499,47500,47501,47502,47503,47531,47563,55858,14941,14942,14943,14945,14947,47729,47730,47731,47732,47733,47734,72311,72312,72313,47737,47736,47735,55964,55965,55966,55967,64176,47792,64185,64186,55995,64195,64196,64205,64206,56019,64214,64215,64216,47842,47843,47844,64244,64245,64246,64254,64255,64256,31497,31498,64272,64274,72469,80663,64285,64286,64296,64299,64300,64305,64307,64308,39731,64314,64315,64316,64317,64321,64324,64325,64326,64327,64330,64334,64335,64336,39765,39808,80772,39851,39852,39853,39854,48105,48106,48107,48108,72686,72687,48211,48212,48213,48214,48215,48216,48217,48218,40020,48224,72812,72813,72819,72821,72825,72827,72828,72829,72830,72831,72832,72833,7307,48277,48278,48279,72870,72871,72875,72883,72889,48316,72895,72901,48329,48332,72910,48335,48336,72913,48337,48339,72916,72917,48340,48341,48342,48343,48346,48347,72924,48344,48345,48348,48349,48350,48351,64741,64742,7404,48368,64805,64809,64814,48432,64818,64819,3116,3117,64837,64841,40304,64916,81301,64918,64917,64920,64921,64926,64928,64929,73122,64931,64930,64936,64937,64940,81326,81327,64946,64947,64948,64956,64959,64960,48682,48683,48684,65078,65081,81484,65101,65100,65120,65123,65145,40591,40592,40593,65212,57049,7918,48986,49004,49011,40821,49025,49026,49027,49028,49029,49030,49031,49032,49033,49034,65441,49065,49088,49089,49090,49091,90052,57298]


all_list = list5+list4+list3+list2+list1

# 转换为集合
set1 = set(list(filtered_set))
set2 = set(all_list)

# 在list1中但不在list2中
only_in_list1 = set1 - set2
# 或者使用 set1.difference(set2)

print(f"只在list1中: {list(only_in_list1)}")

# 在list2中但不在list1中
only_in_list2 = set2 - set1

print(f"只在list2中: {list(only_in_list2)}")